package fractal.view;

import java.awt.CardLayout;
import javax.swing.JPanel;

/** Class make panel application */
public class AppPanel extends JPanel {

	/** view panel manager class */
	private CardLayout cardLayout;

	/** constructor */
	public AppPanel() {
		this.cardLayout = new CardLayout();
		this.initPanel();
	}

	/** initialization panel */
	private void initPanel() {
		super.setLayout(cardLayout);
	}

	/** show panel */
	public void show(String name) {
		this.cardLayout.show(this, name);
	}

	/** next panel */
	public void next() {
		this.cardLayout.next(this);
	}

	/** previous panel */
	public void previous() {
		this.cardLayout.previous(this);
	}
}
